﻿@model HitModel

@{
    ViewBag.Title = "Day " + Model.Date.ToString("yyyy.MM.dd");
}

<h2>Stat: @Model.Hits[0].Stat.Name</h2>
<h3>on day: @Model.Date.ToString("yyyy.MM.dd")</h3>

@using (Html.BeginForm("Create", "Hit", FormMethod.Get))
{
    <input type="hidden" name="date" value="@Model.Hits[0].Date.ToString(DiaryHelper.DateFormat())" />
    <input type="hidden" name="stat" value="@Model.Hits[0].Stat.Id" />
    <button type="submit">New Hit</button>
}
@foreach (Hit h in Model.Hits) {
    @Html.ActionLink(h.Stat.Name, "Index", new { id = h.Id })<br />
    foreach (HitComponent hitComponent in h.HitComponents)
    {
        <p>@(hitComponent.Quantity.Name):
        @hitComponent.Amount 
        @hitComponent.Quantity.Unit.Abbreviation</p>
    }
}
